<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="icon" th:href="@{/img/icon.png}"/>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
	<link rel="stylesheet" th:href="@{/css/global.css}" />
	<title>我的评论</title>
</head>
<body>
	<div class="nk-container">
		<!-- 头部 -->
		<header class="bg-dark sticky-top" th:replace="index::header">

		</header>

		<!-- 内容 -->
		<div class="main">
			<div class="container">
				<!-- 选项 -->
				<div class="position-relative">
					<ul class="nav nav-tabs">
						<li class="nav-item">
							<a th:class="|nav-link ${infoMode==0?'active':''}|" th:href="@{|/user/profile/${user.id}|}">个人信息</a>
						</li>
						<li class="nav-item">
							<a th:class="|nav-link ${infoMode==1?'active':''}|" th:href="@{|/user/mypost/${user.id}|}" th:text="${loginUser.id!=user.id?'它的帖子':'我的帖子'}">我的帖子</a>
						</li>
						<li class="nav-item">
							<a th:class="|nav-link ${infoMode==2?'active':''}|" th:href="@{|/user/mycomment/${user.id}|}" th:text="${loginUser.id!=user.id?'它的评论':'我的评论'}">我的评论</a>
						</li>
					</ul>
					<a th:href="@{|/user/profile/${user.id}|}" class="text-muted position-absolute rt-0" th:if="${loginUser.id==user.id}">返回个人主页&gt;</a>
				</div>
				<!-- 我的评论 -->
				<div class="mt-4">
					<h6><b class="square"></b> 评论的帖子(<i th:text="${commentCount}"></i>)</h6>
					<ul class="list-unstyled mt-4 pl-3 pr-3">
						<li class="border-bottom pb-3 mt-4" th:each="map:${comments}">
							<div class="font-size-16 text-info">
								<a th:href="@{|/discuss/detail/${map.comment.entityId}|}" class="text-info"
								   th:utext="${map.discussPostTitle}"></a>
							</div>
							<div class="mt-1 font-size-14" th:utext="${map.comment.content}"></div>
							<div class="text-right font-size-12 text-muted">
								评论于 <b th:text="${#dates.format(map.comment.createTime, 'yyyy-MM-dd HH:mm:ss')}"></b>
							</div>
						</li>
					</ul>
					<!-- 分页 -->
					<nav class="mt-5" th:replace="index::pagination">

					</nav>
				</div>
			</div>
		</div>

		<!-- 尾部 -->
		<footer class="bg-dark" th:replace="index::footer">

		</footer>
	</div>

	<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.3.1/jquery.min.js" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
	<script th:src="@{/js/global.js}"></script>
</body>
</html>
